﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;

namespace CoderJoe.Aspect
{
    public class AspectModel
    {
        internal static AspectModel Current { get; private set; }

        public IEnumerable<IAspect> GlobalAspects { get { return InnerGlobalAspects; } }
        public IEnumerable<AspectTypeModel> TypeAspects { get { return InnerTypeAspects; } }

        protected List<IAspect> InnerGlobalAspects { get; private set; }
        protected List<AspectTypeModel> InnerTypeAspects { get; private set; }

        public void RegisterGlobalAspect(IAspect aspect)
        {
            InnerGlobalAspects.Add(aspect);
        }

        internal IEnumerable<IAspect> FindAspectsForType(Type type)
        {
            return null;
        }

        internal IEnumerable<IAspect> FindAspectsForMember(MemberInfo member)
        {
            return null;
        }

        public void Configure()
        {
            Current = this;
        }
    }
}
